package com.wayne.leetcode.problems;

import java.util.Arrays;
import java.util.Comparator;

public class Solution853 {
  public static int carFleet(int target, int[] position, int[] speed) {
    int n = position.length;
    Car[] cars = new Car[n];
    for (int i = 0; i < n; i++) {
      cars[i] = new Car(position[i], (double) (target - position[i]) / speed[i]);
    }
    Arrays.sort(cars, Comparator.comparingInt(o -> o.position));

    System.out.println();
    return 0;
  }

  static class Car {
    int position;
    double time;

    Car(int position, double time) {
      this.position = position;
      this.time = time;
    }
  }

  public static void main(String[] args) {
    System.out.println(carFleet(12, new int[]{10, 8, 0, 5, 3}, new int[]{2, 4, 1, 1, 3}));
  }
}